#pragma once
#include <iostream>
#include <clocale>
#include <iomanip>
#include <sstream>
#include <fstream>
#include <string>
#include <array>
#include <vector>
#include <algorithm>
#include <memory>
#include <conio.h>
using namespace std;

#include "Result.h"

class Course
{
protected:
	string courseName;

	vector<Result> vr; //<------------- Uppgift4.1

public:

	Course(void)
	{
		courseName = "";
	}

	Course(string courseName)
		: courseName(courseName)
	{
	}

	string GetCourseName() { return courseName; }
	void SetCourseName(string firstName) { this->courseName = courseName; }

	void AddResult(Result r)
	{
		vr.push_back(r);
	}

	friend ostream & operator<<(ostream &out, const Course &c)
	{
		out << "(";
		out << c.courseName << ")";

		return out;
	}

	friend istream & operator>>(istream &in, Course &c)
	{
		string str;
		getline( in, str, '(');

		getline( in, c.courseName, ')');

		return in;
	}

	friend class StudentRegister;

	~Course(void)
	{
	}
};

